/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FormPrincipal.java
 *
 * Created on 10-dic-2011, 21:17:29
 */
package Vista;

import java.awt.event.ActionListener;
/**
 *
 * @author Angge
 */
public class FormPrincipal extends javax.swing.JFrame {

    /** Creates new form FormPrincipal */
    public FormPrincipal() {
        initComponents();
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();
        jLabelImagen = new javax.swing.JLabel();
        jMenuBarraPrincipal = new javax.swing.JMenuBar();
        jMenuRegistrar = new javax.swing.JMenu();
        jMenuArbitros = new javax.swing.JMenuItem();
        jMenuEquipos = new javax.swing.JMenuItem();
        jMenuPartidos = new javax.swing.JMenu();
        jMenuGenerar = new javax.swing.JMenuItem();
        jMenuConsultas = new javax.swing.JMenu();
        jMenuConsultaEquipo = new javax.swing.JMenuItem();
        jMenuConsultaArbitro = new javax.swing.JMenuItem();
        jMenuConsultaJugadores = new javax.swing.JMenuItem();

        jMenu1.setText("File");
        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edit");
        jMenuBar1.add(jMenu2);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabelImagen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Archivos/Fondo1.png"))); // NOI18N

        jMenuRegistrar.setText("Registrar");

        jMenuArbitros.setText("Arbitros");
        jMenuRegistrar.add(jMenuArbitros);

        jMenuEquipos.setText("Equipos");
        jMenuRegistrar.add(jMenuEquipos);

        jMenuBarraPrincipal.add(jMenuRegistrar);

        jMenuPartidos.setText("Partidos");

        jMenuGenerar.setText("Generar Partidos");
        jMenuPartidos.add(jMenuGenerar);

        jMenuBarraPrincipal.add(jMenuPartidos);

        jMenuConsultas.setText("Consultas");

        jMenuConsultaEquipo.setText("Por Equipos");
        jMenuConsultas.add(jMenuConsultaEquipo);

        jMenuConsultaArbitro.setText("Por Arbitros");
        jMenuConsultas.add(jMenuConsultaArbitro);

        jMenuConsultaJugadores.setText("Por Jugadores");
        jMenuConsultas.add(jMenuConsultaJugadores);

        jMenuBarraPrincipal.add(jMenuConsultas);

        setJMenuBar(jMenuBarraPrincipal);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabelImagen, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jLabelImagen, javax.swing.GroupLayout.PREFERRED_SIZE, 545, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-816)/2, (screenSize.height-583)/2, 816, 583);
    }// </editor-fold>//GEN-END:initComponents

    
public void AddListener (ActionListener listener)   {
    jMenuArbitros.addActionListener(listener);
    jMenuConsultaArbitro.addActionListener(listener);
    jMenuConsultaEquipo.addActionListener(listener);
    jMenuConsultaJugadores.addActionListener(listener);
    jMenuEquipos.addActionListener(listener);
    jMenuGenerar.addActionListener(listener);
   
 
    
}
        /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FormPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FormPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FormPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FormPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new FormPrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabelImagen;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuItem jMenuArbitros;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuBar jMenuBarraPrincipal;
    private javax.swing.JMenuItem jMenuConsultaArbitro;
    private javax.swing.JMenuItem jMenuConsultaEquipo;
    private javax.swing.JMenuItem jMenuConsultaJugadores;
    private javax.swing.JMenu jMenuConsultas;
    private javax.swing.JMenuItem jMenuEquipos;
    private javax.swing.JMenuItem jMenuGenerar;
    private javax.swing.JMenu jMenuPartidos;
    private javax.swing.JMenu jMenuRegistrar;
    // End of variables declaration//GEN-END:variables
}
